<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>文字加密</title>
    <link rel="stylesheet" href="../assets/style.css" />
    <script src="../lib/util.js"></script>
    <script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
  </head>
  <body>
    <h3>
      <span id="title"></span>
    </h3>
  </body>
  <script>
    window.onload = function(){
      function loadData() {
        var url = "http://192.168.1.91:3001/api/charRender";
        $.ajax({
          type: "GET",
          async: true,
          url: url,
          data: '',
          success: function (json) {
            if (!jQuery.isEmptyObject(json)) {
              console.log(JSON.stringify(json));
              var data = json.data;
              $("#title").html(data.title);
            }
          },
          error: function (XMLHttpRequest, textStatus, errorThrown) {
            console.log("请求失败，请检查网络后重试");
          }
        });
      }
      loadData();
    }
  </script>
</html>